package HomeWork1;

public class Test03 {
    public static void main(String[] args) {
        Card card=new Card("黑桃","Q");
        card.showCard(card.color,card.num);
    }
}

class Card{
    String color;
    String num;
    //构造器
    public Card(String color,String num){
        this.color=color;
        this.num=num;
    }
    //方法
    public void showCard(String color,String num){
        System.out.println("花色为"+color+" "+"点数为"+num);
    }
}
